The present invention relates to a system and method for debugging the software which facilitates the development of software which runs on plural different computers inter-linked via a network. The present invention also relates to a recording medium. Particularly, the present invention relates to a distributed debugger system and debugging method that can easily debug, in execution, programs described for the distributed transparent technique which makes a program recognize as if computers inter-linked via a network are virtually one computer. Moreover, the present invention relates to a recording medium on which control programs are recorded.
Distributed System Configuration Foundation:
Conventionally, in order to construct a distributed system that executes processing between plural computers, a software module is created for each of the computers so that communications are accomplished between the computers. A typical example of the distributed system is a client/server system. In this system, a client program and a server program, respectively described, are distributed to different computers. Each program is executed on the corresponding computer. For that reason, the programmer has to design and create communication constructions between modules, in addition to processing of the system itself. This makes difficult to realize the client/server system.
Recently, some distributed construction foundations have been utilized as the technique of easily constructing the distributed systems. The technique called a distributed object is known as one of distributed system construction foundations. This is the technique by which objects on different computers can be manipulated in a manner similar to that to an object on the same computer, in an object-oriented system. In the object-oriented system, a program is executed by sequentially invoking the procedures called “method” of an object. In the distributed object, an object of a method calling destination can be described in a program source code within the computer for the object or on a different computer, in a manner similar to that to the object of the calling source. Hence, if object groups are once distributed on plural computers, a programmer can easily describe programs for a distributed system, without recognizing allocation of objects and an occurrence of communications necessary for an access to objects on different computers after the allocation. CORBA defined the object management group (OMG) and Java-RMI defined by Sun Microsystems Inc. are listed as typical examples of the distributed object technique.
The technique called agent migration is known as another distributed system construction foundation. In this technique, when an instruction “migration” is invoked during execution of an executor of a computer program called agent on a computer, the executor is moved onto another computer while the execution status of the agent at the time of invoking is maintained. Thereafter, the execution can be resumed immediately after the instruction is invoked at the migration destination. The use of agent migration allows a process wanting execution on plural computers to be easily described, like the program executed on a single computer, by merely inserting instruction “migration” into an arbitrary place of a program. Telescript disclosed in JP-A No. 182174/is listed as typical examples of the agent migration.
In the above two techniques regarding distributed object and agent migration, the common concept is “distributed transparency” that a distributed system can be easily constructed by apparently handling plural computers interconnected via a network as a single computer. By utilizing the distributed system construction foundation which provides the distributed transparency, it is possible to avoid the difficulty in resulting from distribution among difficulties in describing programs for distributed systems, for example, difficulty in describing communications between modules or difficulty in recognizing how various types of information or resources within a distributed system are allocated on plural computers.
Parallel Execution:
In order to operate the distributed system efficiently, parallel execution of the distributed system becomes effective. Generally, a single computer has a CPU resource and a memory resource such as a primary memory or a secondary memory and can independently operate without being influenced by others. When two computers are required to implement a computation process respectively, they may implement a simultaneous and parallel computation and then compile the results after completion of the computation. This process can realize a faster computation, compared with the sequential execution in which after one computer first performs the computation process, the other computer performs the computation process.
Generally, there is the disadvantage in that information transfer rate or execution rate at which information is exchanged between different computers via a network is very slow, compared with exchanging information via the primary memory within a single computer. For that reason, in the case of the program which requires an access to a remote computer and a computational process inside a computer, it is preferable to execute both the processes in parallel and to make the CPU execute a computational process inside the computer during a waiting time for an access to the remote computer, compared with the continuous sequence of one process and the other process. Thus, the computational capability of the CPU can be used effectively and fully. The multithread is broadly known as the technique of paralleling the process within the program.
(Distributed Debugger System)
The use of the distributed transparency technique or multithread technique enables effective programs to be easily described. In an actual system construction, it is important to debug the described program. There is the method of using the device called the source level debugger as a conventional debugging method used broadly. According to this method, while a program to be debugged is being actually run, the debugger monitors it. The debugger sets a break point, temporarily halts the execution at an arbitrary location, and displays the execution stack of the program in temporary halt state or the content of a variable. The debugger also monitors an arbitrary variable and displays it if the variable is changed. Thus, the program execution status can be easily grasped.
However, the conventional source level debugger intends only the program running on a single computer. When it is tried to debug a distributed system operated on plural computers, it is necessary to respectively activate plural source level debuggers of respective computers and to manipulate each source level debugger through each corresponding user interface. This makes it difficult to utilize the source level debugger.
Some distributed system debugging techniques are proposed to solve the above-mentioned problems. JP-A No. 203140/1999 discloses the debugging technique for agent migration that automatically activates the agent debugger at a migration destination. This eliminates activating the debuggers on all computers in advance when an agent migrating on plural computers is debugged.
In the technique disclosed in JP-A No. 120366/1997, when a distributed object system activates the method of a remote object, the step execution function of the debugger can be used in distributive and transparent mode over two computers to debug the method. Moreover, even when a method activation source does not recognize a remote object existence place, the place can be specified and debugged. Thus, even when processing is performed over plural computers, the step execution function can be used in a distributive and transparent mode, without knowing the distribution of the process.
JP-A No. 272644/1996 discloses the technique of transmitting a process request with debugging to a remote computer to automatically activate the debugger that debugs a process activated on the remote computer and then issuing a debug command to the debugger. JP-A No. 346912/1993 discloses the technique of manipulating plural debuggers, each which operates on a remote computer, through a single interface.
Other examples of that type of technique are disclosed in JP-A No. 224984/1993, JP-A No. 324394/1993, JP-A No. 185378/1996, Japanese Patent Publication No. 2782971, and JP-A No. 197586/1993.
In order to manipulate plural debuggers operated on plural computers, it is basically necessary to set them respectively. In the prior art, the debugger on each computer is automatically activated. However, each debugger is independently activated and can be merely operated easily via a common user interface.
In the techniques disclosed in JP-A No. 203140/1999, JP-A No. 272644/1996, and JP-A No. 346912/1993, the debugger automatically activates at a remote place. An activated debugger is independent of other debuggers and nothing is considered to the content of setting. In the technique disclosed in JP-A No. 120366/1997, a break point is automatically set to other debuggers in a limited process such as step execution. However, that function only does not require any individual operation.
A further problem is that the execution status of a debugger operating on each of plural computers is managed every computer and that a change in execution status on a computer is not reflected to other computers, except the user interface. In the prior art, a program to be debugged runs inside a single computer only. However, when a single program is executed over plural computers, the operation of a communication destination or a parallel operation of another process on a different computer is not considered. When there is no parallel operation within a distributed system to be debugged, only the computers in an operating state at that time are stopped, so that any trouble does not occur in the process on other computers (not operated). However, when the system that operates in parallel over plural computers is debugged, a break point is detected on any one of computers. When a process temporarily halts on the computer, the execution continues without ceasing the process on other computers. As a result, it becomes difficult to grasp the entire state of the system.
In the technique disclosed in JP-A No. 120366/1997, it is considered to execute a single program over plural computers is considered. However, that art does not have the function of dealing with the parallel operation of a program. In the technique disclosed in JP-A No. 120366/1997, it is considered that the server is a multithread system and the technique relates to parallel processing inside a computer as a server. However, this technique does not consider the distributive processing such that one client executes the parallel processing to plural servers.
In any one of the above-mentioned prior arts, users must use debugger system, with knowledge that debuggers or debug objected systems are distributed over plural computers. Users cannot enjoy the advantage of the distributive transparency that is provided by the distributed system construction foundation during debugging. The technique of solving the above-mentioned problems is not disclosed even in other disclosed patent publications.